﻿namespace DAL.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class AddEmployee : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.employee",
                c => new
                    {
                        EmployeeId = c.Guid(nullable: false),
                        DisplayName = c.String(maxLength: 100),
                        Gender = c.String(maxLength: 10),
                        Hometown = c.String(maxLength: 200),
                        PhoneNumber = c.String(maxLength: 100),
                        IDentityNumber = c.String(maxLength: 100),
                        EmployeeType = c.String(maxLength: 50),
                        DepartmentId = c.String(maxLength: 100),
                        EmployeeNumber = c.String(maxLength: 100),
                        Post = c.String(maxLength: 100),
                    })
                .PrimaryKey(t => t.EmployeeId)
                .Index(t => t.DepartmentId);
            
        }
        
        public override void Down()
        {
            DropIndex("dbo.employee", new[] { "DepartmentId" });
            DropTable("dbo.employee");
        }
    }
}
